package com.xuelang.pipeline.app.application.converter;

import com.xuelang.pipeline.client.application.dto.TraitDTO;
import com.xuelang.pipeline.domain.application.Trait;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 运维特征DTO与运维特征实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface TraitDTOToTraitConverter {
    TraitDTOToTraitConverter INSTANCE = Mappers.getMapper(TraitDTOToTraitConverter.class);

    /**
     * Trait转化为TraitDTO
     * @param traint
     * @return
     */
    TraitDTO traintToTraitDTO(Trait traint);

    /**
     * TraitDTO转化为Trait
     * @param traintDTO
     * @return
     */
    Trait traintDTOToTrait(TraitDTO traintDTO);
}
